<?php

class RedisHelper
{

    public static function push($result,$chanel="anhui_msg") {     
        try {
            // Predis\Autoloader::register();
            $client = new Predis\Client();
            // $result = array(
            //         'code' => 0,
            //         'msg' => 'ok',
            //         'result'=> array(
            //                 'id' => 111222
            //         )
            // );
            $pub = $client->publish($chanel,json_encode($result));
            $client->disconnect();
        }catch (Exception $e){
            Log::error("error", array("system" => "RedisHelper" ,"event" => "RedisHelper", 'input' =>array() ,"exception" => $e));
        }           
    }
}

